<template>
  <el-container>
    <el-header>
      <div>
        <el-menu
          :default-active="activeIndex2"
          class="el-menu-demo"
          mode="horizontal"
          @select="handleSelect"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b">
          <el-menu-item index="1" @click="RepairInfo()">维修信息</el-menu-item>
          <el-submenu index="2">
            <template slot="title">我的工作台</template>
            <el-menu-item index="2-1" @click="addMaintenanceWorker()">新增维修工</el-menu-item>
            <el-menu-item index="2-2" @click="addAnnouncement()">通知公告</el-menu-item>
            <el-menu-item index="2-3" @click="addServiceGuide()">服务指南</el-menu-item>
            <!-- <el-menu-item index="2-3" @click="StudentManagement()">学生管理</el-menu-item> -->
          </el-submenu>
          <!-- <el-menu-item index="3" disabled>消息中心</el-menu-item> -->
          <el-menu-item index="4" @click="StudentManagement()">学生管理</el-menu-item>
        </el-menu>
      </div>
    </el-header>
    <el-main>
      <router-view/>
    </el-main>
  </el-container>
</template>

<script>
  export default{
    name:"Administrator",
    data(){
    	return{
        userName:sessionStorage.getItem("userName")
    	}
    },
    methods:{
      //点击去维修信息
      RepairInfo(){
        this.$router.push("/index")
      },
      //点击新增维修工
      addMaintenanceWorker(){
        this.$router.push("/PersonalInformation")
      },
      //通知公告
      addAnnouncement(){
        this.$router.push("/SetPersonalInformation")
      },
      //服务指南
      addServiceGuide(){
        this.$router.push("/SetPassword")
      },
      //学生管理
    	StudentManagement(){
        this.$router.push("/index")
      }
    }
  }

</script>

<style>
</style>
